//    Dhammapada PSP
//    Copyright (C) 2007 Sakya
//    sakya_tg@yahoo.it
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program; if not, write to the Free Software
//    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#include <pspkernel.h>
#include <pspsdk.h>
#include <stdio.h>
#include <oslib/oslib.h>
#include "settings.h"
#include "main.h"

#ifndef __menu_h
#define __menu_h (1)

#define MENU_MAX_ELEMENTS 100

struct menuElement{
    char name[262];
    char text[262];
    char helpText[262];
    int value;
    int (*triggerFunction)();
};

struct menuElements{
    int selected;
    int first;
    int maxNumberVisible;
    int yPos;
    int xPos;
    int width;
    int height;
    OSL_IMAGE *background;
    int numberOfElements;
    int interline;
    struct menuElement elements[MENU_MAX_ELEMENTS];
    int (*cancelFunction)();
};


int initMenu(struct settings *userSettings);
int clearMenu(struct menuElements *menu);
int drawMenu(struct menuElements *menu);
int processMenuKeys(struct menuElements *menu);

#endif
